//
// Created by sgyt on 2020/2/4.
//
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc,char *argv[])
{
    int pid = getpid();
    printf("pid = [%d]\n",pid);

    int ppid = getppid();
    printf("ppid = [%d]\n",ppid);

    int uid = getuid();
    printf("uid = [%d]\n",uid);

    int euid = geteuid();
    printf("euid = [%d]\n",euid);

    int gid = getgid();
    printf("gid = [%d]\n",gid);

    int egid = getegid();
    printf("egid = [%d]\n",egid);

    return 0;
}
